import apibase from "@/api/apiBase";
import axios from "axios";
import { loginInterface } from "./login.interface";

//用户登录
export const $login = (params: loginInterface) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.post({
    url: '/travel/api/login',
    data: params,
    instance,
  });
}

//获取登录用户信息
export const $loginUser = () => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.get({
    url: '/travel/api/user/loginUser',
    data: {},
    instance,
  });
}